home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1993 December
/
PSL Monthly Shareware CD-ROM (December 1993).iso
/
prgmming
/
dos
/
c
/
boss
/
boss_sup.lzh
/
WINBOSS.H
< prev
next >
Wrap
Text File
|
1992-03-04
|
25KB
|
715 lines
/*
** WINDOW BOSS - Simple but Elegant Window Functions
**
** Lattice, Computer Innovations, Microsoft, Datalight, Aztec,
** Watcom, Mix Power C, Zortech
**
** Copyright (c) 1984, 1985, 1986 - Philip A. Mongelluzzo
** All rights reserved.
**
** The complex web of compiler defines and feature tests follows.
*/
/*
** Computer Innovations comes first....
*/
#ifdef C86
#define BORLAND 0
#define MSCV3 0
#define MSCV4 0
#define MSCV6 0
#define MSC 0
#define MSC3 0
#define MSC4 0
#define DLC 0
#define CI86 1
#define LC2 0
#define LC3 0
#define LC6 0
#define __ZTC__ 0
#define __TSC__ 0
#define MIXPC 0
#define AZTEC 0
#define WATCOM 0
#ifdef _C86_BIG
#define LPTR 1
#define SPTR 0
#else
#define LPTR 0
#define SPTR 1
#endif
#define LATTICE 0
#define void int /* define void as int */
struct WORDREGS { /* register layout is */
unsigned int ax; /* different from the rest !! */
unsigned int bx;
unsigned int cx;
unsigned int dx;
unsigned int si;
unsigned int di;
unsigned int ds; /* <= NB */
unsigned int es; /* <= NB */
unsigned int flags;
};
struct BYTEREGS {
unsigned char al, ah;
unsigned char bl, bh;
unsigned char cl, ch;
unsigned char dl, dh;
};
union REGS {
struct WORDREGS x;
struct BYTEREGS h;
};
struct SREGS {
unsigned int cs;
unsigned int ss;
unsigned int ds;
unsigned int es;
};
extern unsigned wns_mtype(); /* make everyone happy */
#endif /* end C86 Stuff */
/*
** Watcom Stuff
*/
#if WATCOM
#pragma aux v_kstat "_*" parm caller [] \
value struct float struct routine [ax] \
modify [ax bx cx dx es];
#pragma aux xferdata "_*" parm caller [] \
value struct float struct routine [ax] \
modify [ax bx cx dx es];
#pragma aux v_border "_*" parm caller [] \
value struct float struct routine [ax] \
modify [ax bx cx dx es];
#pragma aux _vidblt "_*" parm caller [] \
value struct float struct routine [ax] \
modify [ax bx cx dx es];
#endif
#if WATCOM /* HUGE memory stuff... */
#ifdef M_I86HM /* new with ver 8.5 */
#define SPTR 0
#define LPTR 1
#endif
#endif
/*
** TopSpeed C
*/
#if __TSC__
#define MSCV4 1
#ifdef M_I86XM /* (XLARGE) large code, large data */
#define SPTR 0
#define LPTR 1
#endif
#ifdef M_I86MTM /* (MTHREAD) large code, large data */
#define SPTR 0
#define LPTR 1
#endif
#endif
/*
** Microsoft 4.0, 5.X, 6.X, QuickC, PowerC
*/
#if MSCV6
#undef NULL /* NULL must be redefined */
#define NULL (int)0 /* to avoid useless errors MSC 6.XX */
#define MSCV4 1
#endif
#if MSCV4
#define MSC 1
#define MSCV3 0
#define MSC4 1
#define DLC 0
#define CI86 0
#define LC2 0
#define LC3 0
#define BORLAND 0
#ifndef MIXPC
#define MIXPC 0
#endif
#define AZTEC 0
#ifdef M_I86SM /* small code, small data */
#define SPTR 1
#define LPTR 0
#endif
#ifdef M_I86LM /* large code, large data */
#define SPTR 0
#define LPTR 1
#endif
#ifdef M_I86CM /* small code, large data */
#define SPTR 0
#define LPTR 1
#endif
#ifdef M_I86MM /* large code, small data */
#define SPTR 1
#define LPTR 0
#endif
#define LATTICE 1
#endif
/*
** Microsoft 3.00
*/
#if MSCV3
#define MSC 1
#define MSC4 0
#define DLC 0
#define CI86 0
#define LC2 0
#define LC3 0
#define BORLAND 0
#define MIXPC 0
#ifndef AZTEC
#define AZTEC 0
#endif
#ifdef M_I86SM /* small code, small data */
#define SPTR 1
#define LPTR 0
#endif
#ifdef M_I86LM /* large code, large data */
#define SPTR 0
#define LPTR 1
#endif
#ifdef M_I86CM /* small code, large data */
#define SPTR 0
#define LPTR 1
#endif
#ifdef M_I86MM /* large code, small data */
#define SPTR 1
#define LPTR 0
#endif
#define LATTICE 1
#endif
/*
** Lattice 6.XX
*/
#if LC6 /* Lattice 6 looks like BORLAND! */
#define BORLAND 1 /* from a code standpoint */
#undef NULL /* NULL must be redefined */
#define NULL (int)0 /* to avoid useless errors */
#endif /* any changes here must also */
/* be made in "windows.c" */
/*
** Zortech
*/
#if __ZTC__ /* ZORTECH looks like BORLAND! */
#define BORLAND 1 /* from a code standpoint */
#undef NULL /* NULL must be undefined */
#endif /* any changes here must also */
/* be made in "windows.c" */
/*
** BORLAND
*/
#ifdef __TURBOC__
#ifndef BORLAND
#define BORLAND 1
#endif
#endif
#if BORLAND
#define MSC 1
#define MSC4 1
#define DLC 0
#define CI86 0
#define LC2 0
#define LC3 0
#define MIXPC 0
#define AZTEC 0
#ifdef __SMALL__ /* small code, small data */
#define SPTR 1
#define LPTR 0
#endif
#ifdef __LARGE__ /* large code, large data */
#define SPTR 0
#define LPTR 1
#endif
#ifdef __COMPACT__ /* small code, large data */
#define SPTR 0
#define LPTR 1
#endif
#ifdef __MEDIUM__ /* large code, small data */
#define SPTR 1
#define LPTR 0
#endif
#ifdef __HUGE__ /* large code, large data */
#define SPTR 0
#define LPTR 1
#endif
#define LATTICE 1
#endif
#define TRUE 1 /* truth */
#define FALSE 0 /* lies */
#define The_BOSS TRUE /* convienent equate */
#include "stdio.h" /* standard header */
#if CI86
char *malloc(), *calloc(); /* for the OLD TIMER */
#else
#include "stdlib.h" /* For the rest */
#endif
#if LC6
#include "string.h" /* Now for Lattice 6.XX */
#endif
#if BORLAND | MSC | DLC | LC2 | LC3 | MIXPC | WATCOM | CI86
#if AZTEC
#else
#include "dos.h" /* Lattice stuff */
#endif
#endif
#include "ctype.h" /* character conversion stuff */
#if MSC4
#include "stdarg.h" /* variable arg list marcos */
#include "string.h" /* added 12/26/90 for Topspeed */
#endif
#if AZTEC /* AZTEC DOS.H */
struct WORDREGS {
unsigned int ax;
unsigned int bx;
unsigned int cx;
unsigned int dx;
unsigned int si;
unsigned int di;
unsigned int cflag;
};
struct BYTEREGS {
unsigned char al, ah;
unsigned char bl, bh;
unsigned char cl, ch;
unsigned char dl, dh;
};
union REGS {
struct WORDREGS x;
struct BYTEREGS h;
};
struct SREGS {
unsigned int cs;
unsigned int ss;
unsigned int ds;
unsigned int es;
};
#define FP_SEG(fp) (*((unsigned *)&(fp) + 1))
#define FP_OFF(fp) (*((unsigned *)&(fp)))
struct RS {
int ax, bx, cx, dx, si, di, ds, es;
};
#endif /* End AZTEC DOS.H